package com.fh.fruit.service.config.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.fh.dao.DaoSupport;
import com.fh.entity.Page;
import com.fh.fruit.service.config.ConfigManager;
import com.fh.util.PageData;


@Service("configService")
public class ConfigService implements ConfigManager{

	@Resource(name = "daoSupport")
	private DaoSupport dao;

	@SuppressWarnings("unchecked")
	public List<Map<String, String>> aliPaylistPage(Page page)throws Exception {
		return (List<Map<String, String>>)dao.findForList("ConfigMapper.aliPaylistPage", page);
	}

	@Override
	public int updateAliPayState(PageData pd) throws Exception {
		return (int)dao.update("ConfigMapper.updateAliPayState", pd);
	}

	@Override
	public void saveAliyunConfig(PageData pd) throws Exception {
		dao.save("ConfigMapper.saveAliyunConfig", pd);
	}

}
